package Coral

import (
	"Volta/Core/Container"
	"reflect"
)

func Execute() func(appNm string){
	return func(appNm string){
		instance, err := Container.App.Make(appNm)
		if err != nil {
			return
		}
		method := instance.ConValue.MethodByName(instance.Method)
		if !method.IsValid() {
			return
		}
		begin(func() {
			method.Call([]reflect.Value{})
		})
	}
}
func begin(work func())  {
	work()
}
